#!usr/bin/python
# -*- cofing: UTF-8 —*-
def funcX(x):
    def funY(y):
        return x * y
    return funY
i = funcX(8)
print(i)

print(type(i))

m = funcX(8)(5)
print('m', m)

def func1():
    x = [5]
    def func2():
        x[0] *= x[0]
        return x[0]
    return func2()
n = func1();
print(n)

def func1():
    x = 5
    def func2():
        nonlocal x #定义一个全局变量
        x *= x
        return x
    return func2()
n = func1();
print('n',n)



